PENCIL DEMO BUILDER – makes the demo school's sample data
=========================================================
Pencil v1.0. Keep this folder on the computer; it is NOT uploaded.

The demo has two parts, both made from the SAME sample school:
  1. Demo web portal  = the real Pencil website running the school "demo"
                        (pencil-data/schools/demo.php, 'demo' => true).
                        Its data is pencil-data/schools/demo/demo.sql.
  2. Demo phone apps  = public_html/demo/parent, staff, admin. The REAL app
                        pages with recorded answers (demo/<app>/assets/demo-data.js).

HOW IT IS MADE (done by Claude for each new Pencil version)
  1. Run the new version on a test PHP + MariaDB server (php -S, demo school DB
     "pencil_demo"), open login.php once so all tables are created.
  2. python3 seed.py   -> seed.sql   (12 staff, 12 classes, 91 students, Perera
                                      family, time tables, attendance, fees,
                                      marks, calendar, leave)
     python3 chats.py  -> chats.sql  (staff/parent chats, announcements,
                                      alerts, unread state)
  3. bash dump.sh      -> loads both and writes pencil-data/schools/demo/demo.sql
  4. python3 login.py  (signs in the 3 apps) -> fresh.py -> enumapi.py
     -> build.py (demo app folders) -> icons.py (DEMO ribbon on icons)
  5. Check: node portal.js (web portal pages), node apps.js / interact.js
     (phone size: no errors, sending works, sign out / in works).
  New screens: add sample rows to seed.py / chats.py and the api.php actions
  to enumapi.py, then run again. Update app_version in build.py.

"Today" in the whole demo is fixed: Wed 2 Dec 2026, 10:40 AM.
clockmod.php is the tool that made Pencil's PHP use pnow() (the demo clock).
